class UserInfo < ActiveRecord::Base
  belongs_to :user
  COUNTRY = ['France', 'Norway', 'Sweden']
  validates :login, presence:   true,
                    length:     { minimum: 4 },
                    uniqueness: { case_sensitive: false, on: :create}
  validates :city, presence:   true,
                    length:     { minimum: 2 }
  validates :postal_code, presence:   true,
                    length:     { minimum: 2 }
  validates_numericality_of :age
  attr_accessible :age, :city, :country, :login, :postal_code
end
